﻿///@author Rafał Hazan
///@email  rafal.hazan@gmail.com
#ifndef __PRINTER__
#define __PRINTER__

#include "EvolutionaryAlgorithm.h"
#include "Genotype.h"

#include <iostream>
#include <vector>

/// Klasa pomocnicza wypisujaca populacjie i inne struktury danych na standardowe wyjscie.
class Printer
{
public:
	static void ciout(const EvolutionaryAlgorithm::population_type & pop) {
		std::cout << "[[[" << std::endl;
		for(EvolutionaryAlgorithm::population_type::const_iterator iter = pop.begin(); iter != pop.end(); ++iter)
		{
			std::cout << *iter << std::endl;
		}
		std::cout << "]]]" << std::endl;
	}

	static void ciout(const std::vector<int> & pop) {
		std::cout << "VectorInt[ ";
		for(std::vector<int>::const_iterator iter = pop.begin(); iter != pop.end(); ++iter)
		{
			std::cout << *iter << ", ";
		}
		std::cout << " ]." << std::endl;
	}

		static void ciout(const std::set<int> & pop) {
		std::cout << "VectorInt[ ";
		for(std::set<int>::const_iterator iter = pop.begin(); iter != pop.end(); ++iter)
		{
			std::cout << *iter << ", ";
		}
		std::cout << " ]." << std::endl;
	}
};

#endif